import request from '@/utils/request'

export function addEmployee(data) {
  return request({
    url: '/juanbusiness/org-employee/add',
    method: 'post',
    data
  })
}

export function findEmployee(page,size,employeeNo,name,department,post) {
  return request({
    url: '/juanbusiness/org-employee/findPage',
    method: 'get',
    params: {page: page,size: size,employeeNo: employeeNo,name: name,department: department,post: post}
  })
}

  export function detailEmployee(id) {
    return request({
      url: '/juanbusiness/org-employee/get',
      method: 'get',
      params: {id: id}
    })
  }

export function lockedEmployee(id,operateId,employeeStatus) {
  return request({
    url: '/juanbusiness/org-employee/locked',
    method: 'put',
    params: {id: id, operateId: operateId, employeeStatus: employeeStatus}
  })
}

export function editEmployee(data) {
  return request({
    url: '/juanbusiness/org-employee/edit',
    method: 'put',
    data
  })
}

export function delEmployee(id) {
  return request({
    url: '/juanbusiness/org-employee/del',
    method: 'delete',
    params: {id: id}
  })
}
